Smartphone assisted relapse prevention